package chixing.day09.homework.work6;

import chixing.day07.inherited.Product;

public abstract class Order {
    private String orderId;
    private double orderPrice;
    private static int orderSumNumber = 0;

    public Order(){
        orderSumNumber++;
    }
    public Order(String orderId, double orderPrice) {
        this.orderId = orderId;
        this.orderPrice = orderPrice;
        orderSumNumber++;
    }

    //抽象方法
    public abstract void getOrderType();


    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public double getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(double orderPrice) {
        this.orderPrice = orderPrice;
    }

    public static int getOrderSumNumber() {
        return orderSumNumber;
    }


    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", orderPrice=" + orderPrice +
                '}';
    }
}
